#include "IpaConverter.h"
#include <vector>

string IpaConverter::getValue(string key) {
	map<string, string>::iterator it = container.find(key);
	if (it == container.end()) {
		return "";
	} else {
		return it->second;
	}
}


string IpaConverter::convertStrToPronXML(vector<string>::const_iterator beg,
		vector<string>::const_iterator end){
	string xml = "<PRON SYM = \"";
	while(beg != end) {
		xml += getValue(*beg++);
		if (beg != end) {xml += " ";}
	}
	return xml + "\"/>";
}